<template>
  <div>main</div>
</template>

<script>
export default {
    name: 'Main',
    // 导航守卫: 组件内的守卫
    beforeRouteLeave(to,from){
      console.log( "Main组件内守卫(beforeRouteLeave): to = " , to.path );
      console.log( "Main组件内守卫(beforeRouteLeave): from = " , from.path );
    }
}
</script>

<style>

</style>